#include "../../include/robot/targetFarGroupAction.h"
#include "Aria.h"

using namespace std;
TargetFarGroupAction::TargetFarGroupAction(ArRobot* robot,VisionController *visione,float depth,float degree):ArActionGroup(robot)
{


		//robot.setVel(100);
		/*ArActionAvoidSide *avoid = new ArActionAvoidSide("avoid",100,5);
		robot.addAction(avoid,100);
		ArActionAvoidFront *avoid1 = new ArActionAvoidFront("avoid1",300,100,10,false);
		robot.addAction(avoid1,100);*/
	evitaostfront=new ArActionAvoidFront("evita gli ostacoli",300,100,10,false);
	//evitaostfront=new ArActionLimiterForwards("vai",100,0,10,1);
	evitalaterale= new ArActionAvoidSide("evita ostacolo laterale",100,5);
	gotoposiz = new GoToPos(depth,degree,visione);
	addAction(gotoposiz, 50);
	addAction(evitaostfront,100);
	addAction(evitalaterale,100);
	//addAction(go,1);

}

TargetFarGroupAction::~TargetFarGroupAction()
{
	delete(evitaostfront);
	delete(evitalaterale);
	delete(gotoposiz);
}
